﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ashlen.Portal.Core.DTO;

namespace Ashlen.Portal.Core
{
    public class Utility
    {
        public static ServiceResponse GetErrorResponse(Exception ex) {
            ServiceResponse response = new ServiceResponse();
            response.FriendlyErrorMessage = "There has been an error in the application. Please bear with us while we endeavour to fix it.";
            response.IsSuccess = false;
            response.ErrorMessage = ex.ToString();
            response.ErrorStackTrace = ex.StackTrace;
            return response;
        }
    }
}
